$(function(){

	initEdit();
});

function initEdit(){
	$('#wysiwyg').wysiwyg({
		controls: {
			strikeThrough: {
				visible: true
			},
			underline: {
				visible: true
			},
			separator00: {
				visible: true
			},
			justifyLeft: {
				visible: true
			},
			justifyCenter: {
				visible: true
			},
			justifyRight: {
				visible: true
			},
			justifyFull: {
				visible: true
			},
			
			separator01: {
				visible: true
			},
			
			indent: {
				visible: true
			},
			outdent: {
				visible: true
			},
			
			separator02: {
				visible: true
			},
			
			subscript: {
				visible: true
			},
			superscript: {
				visible: true
			},
			
			separator03: {
				visible: true
			},
			
			undo: {
				visible: true
			},
			redo: {
				visible: true
			},
			
			separator04: {
				visible: true
			},
			
			insertOrderedList: {
				visible: true
			},
			insertUnorderedList: {
				visible: true
			},
			insertHorizontalRule: {
				visible: true
			},
			
			h4mozilla: {
				visible: true && $.browser.mozilla,
				className: 'h4',
				command: 'heading',
				arguments: ['h4'],
				tags: ['h4'],
				tooltip: "Header 4"
			},
			h5mozilla: {
				visible: true && $.browser.mozilla,
				className: 'h5',
				command: 'heading',
				arguments: ['h5'],
				tags: ['h5'],
				tooltip: "Header 5"
			},
			h6mozilla: {
				visible: true && $.browser.mozilla,
				className: 'h6',
				command: 'heading',
				arguments: ['h6'],
				tags: ['h6'],
				tooltip: "Header 6"
			},
			
			h4: {
				visible: true && !($.browser.mozilla),
				className: 'h4',
				command: 'formatBlock',
				arguments: ['<H4>'],
				tags: ['h4'],
				tooltip: "Header 4"
			},
			h5: {
				visible: true && !($.browser.mozilla),
				className: 'h5',
				command: 'formatBlock',
				arguments: ['<H5>'],
				tags: ['h5'],
				tooltip: "Header 5"
			},
			h6: {
				visible: true && !($.browser.mozilla),
				className: 'h6',
				command: 'formatBlock',
				arguments: ['<H6>'],
				tags: ['h6'],
				tooltip: "Header 6"
			},
			
			separator07: {
				visible: true
			},
			
			cut: {
				visible: true
			},
			copy: {
				visible: true
			},
			paste: {
				visible: true
			}
		}
	});
	
	$("#submitadd").click(function(){
		var value = $("#wysiwyg").val();
		

		
		//标题
		var sharetitle = $("#sharetitle").val();
	});
}
